package presentation;

import java.util.Observable;

import control.CControl;
import entity.EPatternRegister;

public class PPatternValue extends PValue {

	public PPatternValue(CControl cControl, String register) {
		cControl.addRegisterObserver(register, this);
	}
	
	@Override
	public void update(Observable obj, Object arg) {
		if (arg instanceof String && obj instanceof EPatternRegister) {
			String text = ((EPatternRegister) obj).getTextValue();
			this.value = text;
        }
	}
}
